#!/usr/bin/env php
<?php
ini_set('display_errors', 'on');
error_reporting(E_ALL);

header('Content-Type: text/html; charset=UTF-8');
date_default_timezone_set('PRC');

defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');

defined('APP_ROOT') or define('APP_ROOT', dirname(__DIR__));
defined('SYS_ROOT') or define('SYS_ROOT', APP_ROOT . '/system');
defined('VENDOR_ROOT') or define('VENDOR_ROOT', APP_ROOT . '/vendor');
defined('YII_ROOT') or define('YII_ROOT', VENDOR_ROOT . '/yiisoft/yii2');
defined('YII_GII') or define('YII_GII', VENDOR_ROOT . '/yiisoft/yii2-gii');

define('APP_KEY', '939529febe1a1fc27b5c7a864a24dff8');

require(VENDOR_ROOT . '/autoload.php');
require(YII_ROOT . '/Yii.php');

$config = require(SYS_ROOT . '/config/console.php');

$application = new yii\console\Application($config);
$exitCode = $application->run();
exit($exitCode);
